Optimal. Leaf size=68 \[ \log (x+2) (d-2 e+4 f-8 g+16 h)+x (e-2 f+4 g-8 h)+\frac{1}{2} x^2 (f-2 g+4 h)+\frac{1}{3} x^3 (g-2 h)+\frac{h x^4}{4} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.200283, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 46, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.043 \[ \log (x+2) (d-2 e+4 f-8 g+16 h)+x (e-2 f+4 g-8 h)+\frac{1}{2} x^2 (f-2 g+4 h)+\frac{1}{3} x^3 (g-2 h)+\frac{h x^4}{4} \]
Antiderivative was successfully verified.
[In] Int[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4))/(4 - 5*x^2 + x^4),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ - 4 f x + 12 g x - 32 h x + \frac{h \left (x + 2\right )^{4}}{4} + \left (\frac{g}{3} - \frac{8 h}{3}\right ) \left (x + 2\right )^{3} + \left (x + 2\right )^{2} \left (\frac{f}{2} - 3 g + 12 h\right ) + \left (d - 2 e + 4 f - 8 g + 16 h\right ) \log{\left (x + 2 \right )} + \int e\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((x**3-2*x**2-x+2)*(h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0407927, size = 68, normalized size = 1. \[ \log (x+2) (d-2 e+4 f-8 g+16 h)+x (e-2 f+4 g-8 h)+\frac{1}{2} x^2 (f-2 g+4 h)+\frac{1}{3} x^3 (g-2 h)+\frac{h x^4}{4} \]
Antiderivative was successfully verified.
[In] Integrate[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4))/(4 - 5*x^2 + x^4),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.005, size = 87, normalized size = 1.3 \[{\frac{h{x}^{4}}{4}}+{\frac{g{x}^{3}}{3}}-{\frac{2\,h{x}^{3}}{3}}+{\frac{f{x}^{2}}{2}}-g{x}^{2}+2\,h{x}^{2}+ex-2\,fx+4\,gx-8\,hx+\ln \left ( 2+x \right ) d-2\,\ln \left ( 2+x \right ) e+4\,\ln \left ( 2+x \right ) f-8\,\ln \left ( 2+x \right ) g+16\,\ln \left ( 2+x \right ) h \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((x^3-2*x^2-x+2)*(h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.700153, size = 84, normalized size = 1.24 \[ \frac{1}{4} \, h x^{4} + \frac{1}{3} \,{\left (g - 2 \, h\right )} x^{3} + \frac{1}{2} \,{\left (f - 2 \, g + 4 \, h\right )} x^{2} +{\left (e - 2 \, f + 4 \, g - 8 \, h\right )} x +{\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left (x + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((h*x^4 + g*x^3 + f*x^2 + e*x + d)*(x^3 - 2*x^2 - x + 2)/(x^4 - 5*x^2 + 4),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.246832, size = 84, normalized size = 1.24 \[ \frac{1}{4} \, h x^{4} + \frac{1}{3} \,{\left (g - 2 \, h\right )} x^{3} + \frac{1}{2} \,{\left (f - 2 \, g + 4 \, h\right )} x^{2} +{\left (e - 2 \, f + 4 \, g - 8 \, h\right )} x +{\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left (x + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((h*x^4 + g*x^3 + f*x^2 + e*x + d)*(x^3 - 2*x^2 - x + 2)/(x^4 - 5*x^2 + 4),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.3224, size = 63, normalized size = 0.93 \[ \frac{h x^{4}}{4} + x^{3} \left (\frac{g}{3} - \frac{2 h}{3}\right ) + x^{2} \left (\frac{f}{2} - g + 2 h\right ) + x \left (e - 2 f + 4 g - 8 h\right ) + \left (d - 2 e + 4 f - 8 g + 16 h\right ) \log{\left (x + 2 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x**3-2*x**2-x+2)*(h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.281569, size = 100, normalized size = 1.47 \[ \frac{1}{4} \, h x^{4} + \frac{1}{3} \, g x^{3} - \frac{2}{3} \, h x^{3} + \frac{1}{2} \, f x^{2} - g x^{2} + 2 \, h x^{2} - 2 \, f x + 4 \, g x - 8 \, h x + x e +{\left (d + 4 \, f - 8 \, g + 16 \, h - 2 \, e\right )}{\rm ln}\left ({\left | x + 2 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((h*x^4 + g*x^3 + f*x^2 + e*x + d)*(x^3 - 2*x^2 - x + 2)/(x^4 - 5*x^2 + 4),x, algorithm="giac")
[Out]